package com.lihao.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lihao.entity.EUser;
import com.lihao.mapper.EUserMapper;
import com.lihao.param.PageParam;
import com.lihao.result.ItemResult;
import com.lihao.service.EUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (EUser)表服务实现类
 *
 */
@Service("eUserService")
public class EUserServiceImpl implements EUserService {

    @Resource
    private EUserMapper eUserMapper;


    @Override
    public PageInfo<EUser> page(PageParam param) {
        Integer pageNum = param.getPageNum();
        Integer pageSize = param.getPageSize();
        PageHelper.startPage(pageNum, pageSize);
        List<EUser> list = eUserMapper.page(param.getSearchName());
        return new PageInfo<>(list);
    }
}
